<template>
  <div class="four_money">
    <h2>
        人人需要四笔钱
    </h2>
    <div class="lingqian">
        <div class="head">
            <h3>零钱管理</h3>
            <span>随时要用的钱在这里</span>
        </div>
        <div class="main" v-for="(v,i) in str.slice(0,3)" :key="i">
            <div class="tetle">{{v.title}}<span>{{v.pmTips}}</span></div>
            <div class="content">
                <div class="shouyi">
                    <p>{{v.pmRates}}<span>%</span></p>
                    <div>7日年化收益率</div>
                </div>
                <div class="biaoyu">{{v.pmContent}}</div>
                
            </div>
        </div>
    </div>
    <div class="touzi">
        <div class="head">
            <h3>稳健投资</h3>
            <span>安稳理财 持有不操心</span>
        </div>
        <div class="main" v-for="(v,i) in str.slice(4,8)" :key="i">
            <div class="tetle">{{v.title}}<span>{{v.pmTips}}</span></div>
            <div class="content">
                <div class="shouyi">
                    <p>{{v.pmRates}}<span>%</span></p>
                    <div>7日年化收益率</div>
                </div>
                <div class="biaoyu">{{v.pmContent}}</div>
                
            </div>
        </div>
    </div>
    <div class="huibao">
        <div class="head">
            <h3>追求回报</h3>
            <span>期限长久 收益更进一步</span>
        </div>
        <div class="main" v-for="(v,i) in str.slice(9,13)" :key="i">
            <div class="tetle">{{v.title}}<span>{{v.pmTips}}</span></div>
            <div class="content">
                <div class="shouyi">
                    <p>{{v.pmRates}}<span>%</span></p>
                    <div>7日年化收益率</div>
                </div>
                <div class="biaoyu">{{v.pmContent}}</div>
                
            </div>
        </div>
    </div>
    <div class="baoxian">
        <div class="head">
            <h3>保险保障</h3>
            <span>为生活托底 解决后顾之忧</span>
        </div>
        <div class="main" v-for="(v,i) in str.slice(14,16)" :key="i">
            <div class="tetle">{{v.title}}<span>{{v.pmTips}}</span></div>
            <div class="content">
                <div class="shouyi">
                    <p>{{v.pmRates}}<span>%</span></p>
                    <div>7日年化收益率</div>
                </div>
                <div class="biaoyu">{{v.pmContent}}</div>
                
            </div>
        </div>
    </div>
  </div>
</template>

<script>
    import { FourMoney } from '@/apis/money';
export default {
    data(){
    return {
      str:[]
    }
  },
    created(){
        FourMoney().then((ok=>{
            console.log(ok.data);
            this.str=ok.data.data;
        }))
    }
    
}
</script>

<style lang="scss">
    h2{
        font-size: .2rem;
        font-weight: bold;
        margin-bottom: .1rem;
    }
    .four_money{
        width: 90%;
        margin:  0 auto;
        .lingqian{
            margin-bottom: .1rem;
        border-radius: .1rem;
        border: 1px solid black;
            .head{
                height: .4rem;
                background-color: #d1e4fe;
                display: flex;
                justify-content:start;
                align-items: center;
                color: #012c88;
                border-radius:10px 10px 0 0 ;
                h3{
                    font-size: .2rem;
                    margin-left: .1rem;
                    margin-right: .1rem;
                    font-weight: bold;
                    span{
                        font-size: .12rem;
                    }
                }
            }
            .main{
                width: 90%;
                border-bottom: 1px solid grey;
                height: 1.2rem;
                margin: .2rem auto 0;
                .tetle{
                    color: gray;
                    font-size: .15rem;
                    span{
                        font-size: .08rem;
                        height: .15rem;
                        width: .45rem;
                        background-color: yellow;
                        margin-left: .1rem;
                    }
                }
                .content{
                    font-size: .14rem;
                    display: flex;
                    justify-content: space-around;
                    align-items: center;
                    .shouyi{
                    display: flex;
                    flex-direction: column;
                    justify-content: space-around;
                    p{
                        display: inline;
                        font-size: .30rem;
                        font-weight: bold;
                        color: red;
                    }
                    }
                    .biaoyu{
                        font-size: .16rem;
                        font-weight: bold;
                    }
                    
                }
            }
        }
        .touzi{
            margin-bottom: .1rem;
        border-radius: .1rem;
        border: 1px solid black;
            .head{
                height: .4rem;
                background-color: #d1e4fe;
                display: flex;
                justify-content:start;
                align-items: center;
                color: #8a3fdf;
                border-radius:10px 10px 0 0 ;
                h3{
                    font-size: .2rem;
                    margin-left: .1rem;
                    margin-right: .1rem;
                    font-weight: bold;
                    span{
                        font-size: .12rem;
                    }
                }
            }
            .main{
                width: 90%;
                border-bottom: 1px solid grey;
                height: 1.2rem;
                margin: .2rem auto 0;
                .tetle{
                    color: gray;
                    font-size: .15rem;
                    span{
                        font-size: .08rem;
                        height: .15rem;
                        width: .45rem;
                        background-color: yellow;
                        margin-left: .1rem;
                    }
                }
                .content{
                    font-size: .14rem;
                    display: flex;
                    justify-content: space-around;
                    align-items: center;
                    .shouyi{
                    display: flex;
                    flex-direction: column;
                    justify-content: space-around;
                    p{
                        display: inline;
                        font-size: .30rem;
                        font-weight: bold;
                        color: red;
                    }
                    }
                    .biaoyu{
                        font-size: .16rem;
                        font-weight: bold;
                    }
                    
                }
            }
        }
        .huibao{
            margin-bottom: .1rem;
        border-radius: .1rem;
        border: 1px solid black;
            .head{
                height: .4rem;
                background-color: #fbf1f2;
                display: flex;
                justify-content:start;
                align-items: center;
                color: #b23d51;
                border-radius:10px 10px 0 0 ;
                h3{
                    font-size: .2rem;
                    margin-left: .1rem;
                    margin-right: .1rem;
                    font-weight: bold;
                    span{
                        font-size: .12rem;
                    }
                }
            }
            .main{
                width: 90%;
                border-bottom: 1px solid grey;
                height: 1.2rem;
                margin: .2rem auto 0;
                .tetle{
                    color: gray;
                    font-size: .15rem;
                    span{
                        font-size: .08rem;
                        height: .15rem;
                        width: .45rem;
                        background-color: yellow;
                        margin-left: .1rem;
                    }
                }
                .content{
                    font-size: .14rem;
                    display: flex;
                    justify-content: space-around;
                    align-items: center;
                    .shouyi{
                    display: flex;
                    flex-direction: column;
                    justify-content: space-around;
                    p{
                        display: inline;
                        font-size: .30rem;
                        font-weight: bold;
                        color: red;
                    }
                    }
                    .biaoyu{
                        font-size: .16rem;
                        font-weight: bold;
                    }
                    
                }
            }
        }
        .baoxian{
            margin-bottom: .1rem;
        border-radius: .1rem;
        border: 1px solid black;
            .head{
                height: .4rem;
                background-color: #f8f3ee;
                display: flex;
                justify-content:start;
                align-items: center;
                color: #843d00;
                border-radius:10px 10px 0 0 ;
                h3{
                    font-size: .2rem;
                    margin-left: .1rem;
                    margin-right: .1rem;
                    font-weight: bold;
                    span{
                        font-size: .12rem;
                    }
                }
            }
            .main{
                width: 90%;
                border-bottom: 1px solid grey;
                height: 1.2rem;
                margin: .2rem auto 0;
                .tetle{
                    color: gray;
                    font-size: .15rem;
                    span{
                        font-size: .08rem;
                        height: .15rem;
                        width: .45rem;
                        background-color: yellow;
                        margin-left: .1rem;
                    }
                }
                .content{
                    font-size: .14rem;
                    display: flex;
                    justify-content: space-around;
                    align-items: center;
                    .shouyi{
                    display: flex;
                    flex-direction: column;
                    justify-content: space-around;
                    p{
                        display: inline;
                        font-size: .30rem;
                        font-weight: bold;
                        color: red;
                    }
                    }
                    .biaoyu{
                        font-size: .16rem;
                        font-weight: bold;
                    }
                    
                }
            }
        }
    }
</style>